<template>
	<view class="shop-car">
		<commonCar :list="goodsProducts" @delect="delect" @accounts="accounts">
			<!-- <text>123456</text> -->
		</commonCar>
		<!-- 删除弹框 -->
		<view class="delete-box" v-show="isModel">
			<view class="delete">
				<view class="delete-top">
					确定将这1个商品删除？
				</view>
				<view class="delete-bottom">
					<view class="delete-bottom-left" @click="isModel=false">
						我在想想
					</view>
					<view class="delete-bottom-right" @click="isModel=false">
						删除
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import commonCar from '@/components/shopCar/shopCar.vue'
	export default {
		data() {
			return {
				isModel:false,
				goodsProducts: [{
					name: '金豆豆的店铺',
					checked: 1,
					goods: [{
						img: '../../static/goods_avatar.png',
						title: '植物护洗手液免洗漱75%酒植物护',
						remark: '薯条大小混合32包装',
						price: '3000',
						number: 1,
						checked: 1
					}, {
						img: '../../static/goods_avatar.png',
						title: 'mate40',
						remark: '128G',
						price: '1000',
						number: 1,
						checked: 1
					}]
				},{
					name: '华为旗舰店',
					checked: 1,
					goods: [{
						img: '../../static/goods_avatar.png',
						title: 'P40',
						remark: '64G',
						price: '129',
						number: 1,
						checked: 1
					}, {
						img: '../../static/goods_avatar.png',
						title: 'P50',
						remark: '32G',
						price: '156',
						number: 1,
						checked: 1
					}]
				}],
			}
		},
		components: {
			commonCar
		},
		methods: {
			delect(e){
				this.isModel = true;
				console.log(e);
			},
			accounts(e){
				console.log(e);
				uni.navigateTo({
					url:'/myPackageA/mine/placeOrder/placeOrder'
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.delete-box{
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		background-color: rgba(142,141,140,0.82);
		.delete{
			position: absolute;
			top: 30%;
			left: 0;
			right: 0;
			margin: auto;
			width: 560rpx;
			height: 232rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			.delete-top{
				width: 100%;
				height: 116rpx;
				line-height: 116rpx;
				text-align: center;
				font-size: 36rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #333333;
				border-bottom: 1px solid #F2F2F2;
			}
			.delete-bottom{
				width: 100%;
				height: 116rpx;
				line-height: 116rpx;
				display: flex;
				.delete-bottom-left{
					flex: 1;
					border-right: 1px solid #F2F2F2;
					font-size: 36rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #999999;
					text-align: center;
				}
				.delete-bottom-right{
					flex: 1;
					font-size: 36rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #FF7200;
					text-align: center;
				}
			}
		}
	}
	.shop-car {
		width: 750rpx;
		min-height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		background: #F5F5F5;
	}
</style>
